package com.longteng.junit.statement;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

/**
 * Created by celes on 2015/12/8
 */
public class FrameworkMethod {

    private Method method;


    public FrameworkMethod(Method method){
        this.method = method;
    }


    public Object invoke(Object object,Object... parameters) throws Throwable {
        return this.method.invoke(object, parameters);
    }

    public Annotation[] getAnnotations(){
        return method.getAnnotations();
    }

    public Method getMethod(){
        return this.method;
    }

    public String getName(){
        return this.method.getName();
    }

    public Class<?> getDeclaringClass() {
        return method.getDeclaringClass();
    }

    private Class<?>[] getParameterTypes() {
        return method.getParameterTypes();
    }
}
